﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SdmxMl.Manager;
using SdmxMl.Structure;
using SdmxMl.Common;

namespace bfs.sms.sdmx.util.Variable
{
    public class VariableSheet
    {
        public ConceptType RootConcept { get; private set; }

        public ConceptSchemeType Scheme { get; private set; }

        public List<Variable> VarList { get; private set; }

        public bool IsFullScheme { get { return Scheme.Id == RootConcept.Id; } }

        public VariableSheet(ConceptSchemeType cst)
            : this(cst, null)
        { }

        public VariableSheet(ConceptSchemeType cst, ConceptType root)
        {
            VarList = new List<Variable>();

            Scheme = cst;
            if (root != null)
                RootConcept = root;
            else
            {
                RootConcept = new ConceptType();
                RootConcept.Id = cst.Id;
                RootConcept.Name = cst.Name;
                RootConcept.Description = cst.Description;
            }
        }
    }
}
